package cn.edu.zju.gis.disasterBE.sever.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Timestamp;

@Data
@TableName("disaster_response")
@ApiModel("灾害响应表")
public class DisasterResponse implements Entity<Integer>{
    @TableId(value = "did", type = IdType.AUTO)
    @ApiModelProperty(value = "灾害id")
    private Integer did;

    @TableField(value = "name")
    @ApiModelProperty(value = "灾害名称")
    private String name;

    @TableField(value = "country")
    @ApiModelProperty(value = "灾害国家")
    private String country;

    @TableField(value = "lon")
    @ApiModelProperty(value = "经度 longitude")
    private double lon;

    @TableField(value = "lat")
    @ApiModelProperty(value = "纬度 latitude")
    private double lat;

    @TableField(value = "start_time")
    @ApiModelProperty(value = "响应发起时间")
    private Timestamp startTime;

    @TableField(value = "end_time")
    @ApiModelProperty(value = "响应结束时间")
    private Timestamp endTime;

    @TableField(value = "dtype")
    @ApiModelProperty(value = "灾害类型")
    private Integer dtype;

    @TableField(value = "tag")
    @ApiModelProperty(value = "灾害标签")
    private String tag;

    @TableField(value = "sponsor")
    @ApiModelProperty(value = "发起人")
    private String sponsor;

    @TableField(value = "responsor")
    @ApiModelProperty(value = "回应人")
    private String responsor;

    @TableField(value = "aoijson")
    @ApiModelProperty(value = "几何要素json")
    private String aoijson;

    @TableField(value = "description")
    @ApiModelProperty(value = "灾害描述")
    private String description;

    @Override
    public Integer id()
    {
        return did;
    }
}